package top.infopub.enums.mkt;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public enum CoopEffectEnum {
    COOP_EFF1("1", "关系维护"),
    COOP_EFF2("2", "资质补充"),
    COOP_EFF3("3", "资金投入"),
    COOP_EFF4("4", "运营合作");

    private String code;

    private String name;

    CoopEffectEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static List<Map<String, String>> asList() {
        List<Map<String, String>> list = new ArrayList<>();
        Map<String, String> map;
        for (CoopEffectEnum cee : CoopEffectEnum.values()) {
            map = new HashMap<>();
            map.put("code", cee.getCode());
            map.put("name", cee.getName());
            list.add(map);
        }
        return list;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
